package com.higgins.eventtracking.client.datamaintenance;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.logical.shared.SelectionEvent;
import com.google.gwt.event.logical.shared.SelectionHandler;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.DockLayoutPanel;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.RootLayoutPanel;
import com.google.gwt.user.client.ui.TabPanel;
import com.google.gwt.user.client.ui.TextBox;
import com.google.gwt.user.client.ui.VerticalPanel;

public class DataMaintenance implements EntryPoint {


	public DataMaintenance()	{
		super();
	}
	
	@SuppressWarnings({ "unchecked", "rawtypes" })
	public void onModuleLoad() {
		TabPanel tabPanel = new TabPanel();
		tabPanel.setSize("200em","100em");
		final MaintainHealthEventTab maintainHealthEventTab = new MaintainHealthEventTab();
		tabPanel.add(maintainHealthEventTab, "Maintain HealthEvent");
		maintainHealthEventTab.update();
		
		tabPanel.selectTab(0);

		RootLayoutPanel.get().add(tabPanel);
		tabPanel.addSelectionHandler(new SelectionHandler<Integer>() {
            @Override
            public void onSelection(SelectionEvent<Integer> integerSelectionEvent) {

                if (integerSelectionEvent.getSelectedItem() == 0)	{
                	maintainHealthEventTab.update();
                }
            }
        });
	}
}
